1. Field of the Invention
The present invention relates to the field of signal processing. More specifically this invention relates to gain control in an amplifier circuit.
2. Description of Related Art
Gain control is an important part of preventing distortion in systems in which an amplifier must handle a wide range of inputs. Improper gain control can result in clipping or distortion of the amplifier output signal. One application in which amplifiers process a wide range of inputs is in the processing of sound signals. For example, an electrical signal generated from a human voice may vary in signal strength depending on the person being recorded, the language used and, the position of the speaker with respect to a microphone. Typically, these voice signals are received by commercially available microphones which output signals varying from hundreds of microvolts to hundreds of millivolts. A pre-amplifier may be used to amplify the signals before input into a second stage amplifier. An automatic gain control circuit adjusts the pre-amplifier increasing gain when voice signals are weak and decreasing gain when voice signals are strong to prevent overdriving the second stage amplifier.
One arrangement for implementing a gain control circuit in an amplifier system is shown in FIG. 1. In FIG. 1, a sound signal is received by a microphone 104 which converts the sound signal into an electrical signal. A preamplifier 108 amplifies the electrical signal into a range appropriate for a more powerful amplifier 112 typically a second stage amplifier. Processing circuitry 116, 120, such as analog anti-aliasing filters 116 process the output of amplifier 112. A peak detector 124 also receives the amplifier output signal. The peak detector detects a local peak of the amplifier output signal 112 and generates a peak indicator signal. An automatic gain control circuit (AGC) 128 receives the peak indicator signal and outputs a control signal used to adjust the gain in an amplifier. The amplifier may be a preamplifier 108 or the second stage amplifier 112.
In a prior art circuit implementation of a peak detector, an AGC control circuit and a pre-amplifier, the peak detector circuit inputs the output from amplifier 112 into an operational amplifier within the peak detector 124. The peak detector 124 uses a combination of operational amplifiers and transistors to generate an output voltage corresponding to the peak of the signal received by the peak detector.
The output voltage, V.sub.AGC, of the peak detector 124 is input into AGC control circuit 128. Typically the AGC control circuit uses a plurality of transistors to compare the voltage V.sub.AGC with a reference voltage VDet to generate an AGC control signal. The AGC control signal is related to the difference between V.sub.AGC and the reference voltage V.sub.Det.
A pre-amplifier 108 uses the AGC control signal to adjust the gain of pre-amplifier 108. The gain of pre-amplifier 108 typically can be computed from the transconductance of transistors within the preamplifier. The transconductance of these preamplifier transistors multiplied by the resistance of a load resistor typically determines the gain of the pre-amplifier. The transconductance of the transistors in the preamplifier is a function of the current flowing through the transistors. The current flowing through the preamplifier is a function of the output of the peak detector 124. Thus the gain of the pre-amplifier depends on the output of the peak detector 124. As the output from the peak detector increases, the gain of the pre-amplifier 108 decreases. Typical prior art gain control devices are described in detail in U.S. patent application Ser. No. 5,241,494 issued to Blyth, et al. and U.S. Pat. No. 4,890,259 issued to Simko.
One problem with the previously described prior art technique for implementing an AGC control is that the allowable dynamic range of the microphones 104 into the preamplifier 108 is very limited. When large over drive signals are applied to the input of the pre-amplifier, (large over drive signals being defined as on the order of tens of millivolts) severe distortion is created and signal integrity is significantly degraded.
A second problem with standard pre-amplifier gain control designs is that the maximum signal gain is not very well controlled. This is because the transconductance (G.sub.M) of preamplifier transistors and the output load resistor which together determine the gain of the pre-amplifier do not track each other. The resistance of the load resistor and the G.sub.M of pre-amplifier transistors depend on independent process parameters, thus substantial variations in production occurs. Either of these components may have as much as a 30% variation due to variations in process parameters.
Thus it is desirable to have a method and apparatus for controlling the gain of the preamp stage which is able to handle wide dynamic ranges while offering improved control of the gain.